package hlhj.fhp.checkpoint.presenter

import android.content.Context
import com.example.mymvp.mvp.BasePresenter
import hlhj.fhp.checkpoint.iview.OrderListView
import hlhj.fhp.checkpoint.javaBean.ViolationOrderBean
import hlhj.fhp.checkpoint.javaBean.YearOrderBean
import hlhj.fhp.checkpoint.module.OrderListModule

/**
 * Created by Never Fear   on 2018\11\12 0012.
Never More....
 */
class OrderListPresenter :BasePresenter<OrderListModule,OrderListView>(), OrderListModule.OrderListListener {
    override fun violationOrderResp(violationOrderBean: ViolationOrderBean) {
        view?.setViolationOrders(violationOrderBean)
    }

    override fun createModule() {
        module= OrderListModule()
        module?.listener=this
    }

    fun getViolation(status: Int,page: Int,c: Context){
        module?.getViolationOrder(status, page, c)
    }
    fun getYear(status: Int,page: Int,c: Context){
        module.getYearOrder(status, page, c)
    }
    override fun yearOrderResp(yearOrderBean: YearOrderBean) {
        view?.setYearOrders(yearOrderBean)
    }
}